package day1.array;

import org.junit.Test;

/**
 * @author joker
 * @date 2022/4/11 0011 - 20:34
 */
public class Test02 {
    public static void main(String[] args) {
//        SingleInstance instance = SingleInstance.getInstance();
        Student a = new Student();
        Student b = new Student();
        a.setName("zhangsan");
        b.setName("lisi");
        System.out.println(a);
        System.out.println(b);
        swap1(a,b);
        System.out.println(a);
        System.out.println(b);
        swap(a,b);
        System.out.println(a);
        System.out.println(b);
    }

    private static void swap1(Student e, Student f) {
        String name = e.getName();
        e.setName(f.getName());
        f.setName(name);
    }

    private static void swap(Student e, Student f) {
        Student a= e;
        e=f;
        f=a;
    }
    @Test
    public void test1(){
        String s1="";
        String s2=" ";
        String s3=null;
        System.out.println(s1.isEmpty());
        System.out.println(s2.isEmpty());
        System.out.println(s3.isEmpty());

    }


}
